/*
Kakine
ActionScript Framework
Copyright © 2011, PUNY, LLC.

This file is part of KAKINE.

KAKINE is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

KAKINE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with KAKINE.  If not, see <http://www.gnu.org/licenses/>.
*/ 
package com.puny.mvc.controllers.particle
{
	import com.puny.mvc.models.Model;
	import com.puny.mvc.views.singleviews.ParticleView;
	
	import flash.display.Stage;
	import flash.geom.Point;
	
	/**
	 * $Revision: 396 $
	 * Definition of a world for particle effect.
	 * <ul>
	 * <li>The number of initial particles, total particles, and increasing particles.</li>
	 * <li>Gravity</li>
	 * <li>ParticleView class</li>
	 * <li>special logic to initialize</li>
	 * <li>special logic while moving</li>
	 * <li>conditions for particle life time</li>
	 * </ul>
	 */
	public interface IWorld
	{
		/**
		 * @return the total number of particles in this world.
		 */
		function get total():Number;
		/**
		 * @return the initial number of particles in this world.
		 */
		function get init():Number;
		/**
		 * @return the incremental number of particles in this world.
		 */
		function get increment():Number;
		/**
		 * @return graivty vector in this world.
		 */
		function get gravity():Point;
		/**
		 * @param total the total number of particles in this world
		 * @return instance of a ParticleView or an extended class from ParticleView
		 */
		function createView(total:Number):ParticleView;
		/**
		 * @param model should be initialize
		 * @return initial force vector to be applied for the model. 
		 */
		function specialInitialize(model:Model):Point;
		/**
		 * @param model should be initialize
		 * @return total force vector to be applied for the given model while it's moving. 
		 */
		function sumUpAccelaration(model:Model):Point;
		/**
		 * @param model should be checked.
		 * @param stage instance
		 * @return true if the life of the given model is over.
		 */
		function isOver(model:Model,stage:Stage):Boolean;
	}
}